import { aceessControll } from "@/.utils/accessAdmin";
import { Location, NavigateFunction } from "react-router-dom";
// 权限效验逻辑
export const aceessValid = (location: Location, navigate: NavigateFunction) => {
  if (!aceessControll(location) && location.pathname != "/403") {
    navigate("/403");

    return false;
  }
  return true;
};
/** 对路由权限的控制 */
export const getAccess: () => string[] = () => {
  return ["admins"];
};
